package com.kudian.restful.entity;

import java.sql.Timestamp;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.Table;

/**
 * BackOrder entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "back_order")
public class BackOrder implements java.io.Serializable {

	// Fields

	private Integer backId;
	private String backSn;
	private Integer orderId;
	private Timestamp addTime;
	private Timestamp confirmTime;
	private Integer userId;
	private Short status;

	// Constructors

	/** default constructor */
	public BackOrder() {
	}

	/** minimal constructor */
	public BackOrder(String backSn, Integer orderId, Timestamp addTime,
			Timestamp confirmTime, Integer userId) {
		this.backSn = backSn;
		this.orderId = orderId;
		this.addTime = addTime;
		this.confirmTime = confirmTime;
		this.userId = userId;
	}

	/** full constructor */
	public BackOrder(String backSn, Integer orderId, Timestamp addTime,
			Timestamp confirmTime, Integer userId, Short status) {
		this.backSn = backSn;
		this.orderId = orderId;
		this.addTime = addTime;
		this.confirmTime = confirmTime;
		this.userId = userId;
		this.status = status;
	}

	// Property accessors
	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "back_id", unique = true, nullable = false)
	public Integer getBackId() {
		return this.backId;
	}

	public void setBackId(Integer backId) {
		this.backId = backId;
	}

	@Column(name = "back_sn", nullable = false, length = 20)
	public String getBackSn() {
		return this.backSn;
	}

	public void setBackSn(String backSn) {
		this.backSn = backSn;
	}

	@Column(name = "order_id", nullable = false)
	public Integer getOrderId() {
		return this.orderId;
	}

	public void setOrderId(Integer orderId) {
		this.orderId = orderId;
	}

	@Column(name = "add_time", nullable = false, length = 19)
	public Timestamp getAddTime() {
		return this.addTime;
	}

	public void setAddTime(Timestamp addTime) {
		this.addTime = addTime;
	}

	@Column(name = "confirm_time", nullable = false, length = 19)
	public Timestamp getConfirmTime() {
		return this.confirmTime;
	}

	public void setConfirmTime(Timestamp confirmTime) {
		this.confirmTime = confirmTime;
	}

	@Column(name = "user_id", nullable = false)
	public Integer getUserId() {
		return this.userId;
	}

	public void setUserId(Integer userId) {
		this.userId = userId;
	}

	@Column(name = "status")
	public Short getStatus() {
		return this.status;
	}

	public void setStatus(Short status) {
		this.status = status;
	}

}